Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimized oslGetImagePixel function for better readability and performance #50

Merged
merged 1 commit into from
Sep 1, 2024

Conversation

dogo
Copy link
Owner

@dogo dogo commented Sep 1, 2024

  • Added early boundary checks for x and y coordinates to prevent unnecessary processing.
  • Simplified switch-case structure and improved 4-bit pixel format handling.
  • Enhanced error handling for unsupported pixel formats.
  • Ensured the function returns -1 for out-of-bounds or unsupported cases.

…mance

- Added early boundary checks for x and y coordinates to prevent unnecessary processing.
- Simplified switch-case structure and improved 4-bit pixel format handling.
- Enhanced error handling for unsupported pixel formats.
- Ensured the function returns -1 for out-of-bounds or unsupported cases.
@dogo dogo merged commit 8ace700 into master Sep 1, 2024
6 checks passed
@dogo dogo deleted the feature/improve-oslGetImagePixel branch September 1, 2024 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant